function out = lowpass(x, fs, cutoff)

N = 2;
wn = (2*cutoff)/fs;
[B, A] = butter(N, wn);

for i = 1:size(x,2)
    out(:,i) = filtfilt(B,A,x(:,i));
end
